package com.wuchao.spring.ioc.factory.producing;

import com.wuchao.spring.ioc.factory.service.FactoryService;
import com.wuchao.spring.ioc.factory.serviceImpl.ProductHapi;
import com.wuchao.spring.ioc.factory.serviceImpl.ProductWusu;

/**
 * @Author wuchao66
 * @Date 2022/9/26 10:29
 * @PackageName:com.wuchao.spring.ioc.factory.producing
 * @ClassName: Produce
 * @Description: TODO
 * @Param
 * @Version 1.0
 */
public class Produce {//工厂生产类
    public FactoryService getProduce(int op){
      return   op==1?new ProductHapi():new ProductWusu();//三元运算符
    }
}
